package operation;

import book.BookList;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: lenovo
 * Date: 2024-06-04
 * Time: 22:06
 */
public class ExitOperation implements IBooks{
    @Override
    public void work(BookList booklist) {
        int count = booklist.getUsedSize();
        for (int i = 0; i < count; i++) {
            booklist.setBooks(i,null);
        }
        booklist.setUsedSize(0);
        System.out.println("成功退出图书管理系统");
        System.exit(0);
    }
}
